<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Shortlinksh5 extends Model
{
    protected $table = 'short_links_h5';
    protected $primaryKey = 'id';

    public static function shortLinksH5Detial($links_id)
    {
        return self::where("links_id",$links_id)->first();
    }

    public static function insertShortLinksH5($links_id,$name,$company,$title,$descript,$button_text,$phone,$background_img,$notice)
    {
        return self::insertGetId(["links_id"=>$links_id,"name"=>$name,"company"=>$company,"title"=>$title,"descript"=>$descript,"button_text"=>$button_text,"phone"=>$phone,"background_img"=>$background_img,"notice"=>$notice,"created_at"=>time()]);
    }
}
